// fetch的封装
import qs from 'qs'

export const myGet = (url)=>{
  return fetch(url)
    .then(res => res.json())
}

export const myPost = (url, data)=>{
  return fetch(url, {
    method: 'POST',
    body: qs.stringify(data)
  })
    .then(res => res.json())
}

export const getMenuList = ()=>{
  myGet('/api/menulist')
}